<template>
    <div class="meeting-apply">
        <el-table :data="meetingApplyData">
            <el-table-column label="会议名称" prop="topic"/>
            <el-table-column label="会议发起人" prop="host"/>
            <el-table-column label="创建时间" prop="startTime"/>
            <el-table-column label="流程状态">
                <template #default="s">
                    {{s.row.isEnd?'已结束':'未结束'}}
                </template>
            </el-table-column>
            <el-table-column label="结束时间" prop="endTime"/>
<!--            <el-table-column label="流程实例编号" prop="processInstanceId"/>-->
            <el-table-column label="操作">
                <template #default="s">
                    <el-button type="primary" @click="lookDetailClick(s.row)">查看详情</el-button>
                </template>
            </el-table-column>
        </el-table>
        <meeting-apply-task-detail ref="processDetailRef"/>
    </div>
</template>

<script>
import {personalMeetingApply} from "../../../network/adm/meeting";
import MeetingApplyTaskDetail from "./comps/MeetingApplyTaskDetail.vue";

export default {
    name: "MeetingApply",
    components: {MeetingApplyTaskDetail},
    data(){
        return {
            meetingApplyData: []
        }
    },
    methods:{
        lookDetailClick(row){
            let detail = this.$refs.processDetailRef;
            detail.processInstanceId = row.processInstanceId;
            detail.visible = true;
        },
        loadingMeetingApplyData(){
            personalMeetingApply().then(vo=>{
                this.$response.handle({
                    data: vo,
                    successFn: ()=>{
                        this.meetingApplyData = vo.data;
                    },
                    log: '我发起的会议'
                })
            })
        }
    },
    created() {
        this.loadingMeetingApplyData();
    }
}
</script>

<style scoped>
*{

}
.meeting-apply{
    min-height: 99%;
    background: white;
}
</style>
